package com.project.common.domain.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.project.common.domain.po.BasePO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import lombok.Data;

/**
 * @author: 陈刚
 * @blame:
 * @date: 2022/10/3 23:16
 **/
@Data
@MappedSuperclass
public class User extends BasePO {
    @Schema(description = "账号")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL COMMENT '账号'")
    private String name;

    @Schema(description = "昵称")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL COMMENT '昵称'")
    private String nick;

    @Schema(description = "真实姓名")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL COMMENT '真实姓名'")
    private String realName;

    @Schema(description = "头像")
    @Column(columnDefinition = "varchar(200) DEFAULT NULL COMMENT '头像'")
    private String avatar;

    @Schema(description = "电话")
    @Column(columnDefinition = "varchar(64) DEFAULT NULL")
    private String phone;

    @JsonIgnore
    @Schema(description = "密码")
    @Column(columnDefinition = "varchar(72) DEFAULT NULL")
    private String password;

    @Schema(description = "描述")
    @Column(columnDefinition = "varchar(500) DEFAULT NULL")
    private String description;

    @Schema(description = "状态")
    @Column(columnDefinition = "tinyint(3) DEFAULT '1' COMMENT '1正常，2禁用，3过期，4拉黑，0删除'")
    private Integer status;

    @Schema(description = "备注")
    @Column(columnDefinition = "varchar(500) DEFAULT NULL")
    private String remark;

    @Schema(description = "用户类型")
    @Column(columnDefinition = "tinyint(3) DEFAULT '0' COMMENT '0-会员 1 XX，2 会员+企业用户'")
    private Integer userType;
}
